package com.eagle.coders.core.exceptions;

import java.util.ArrayList;
import java.util.List;

/**
 * <code>ValidationStackException</code>
 store the multiple exceptions
 * caught during back end validation
 * 
 * This class is built as part of the validation framework
 * requirement to capture a list
 * of exceptions which is independent while processing the service
 * in the server.
 * 
 * @author anees
 */
public class ValidationStackException extends BaseAppException {

	private static final long serialVersionUID = 1L;

	private final List<BaseAppException> validationExceptions;
    
    public ValidationStackException() {
        super();
        validationExceptions = new ArrayList<BaseAppException>();
    }

    public void addException(BaseAppException exception) {
        validationExceptions.add(exception);
    }

    public List<BaseAppException> getValidationExceptions() {
        return validationExceptions;
    }
}
